package com.guiji.text2video.fastvideo.service.Impl;

import com.guiji.text2video.common.core.utils.DateUtils;
import com.guiji.text2video.fastvideo.domain.vo.Text2videoNewsSession;
import com.guiji.text2video.fastvideo.mapper.Text2videoNewsSessionMapper;
import com.guiji.text2video.fastvideo.service.IText2videoNewsSessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author scl
 * @date 2021-07-20
 */
@Service
public class Text2videoNewsSessionServiceImpl implements IText2videoNewsSessionService
{
    @Autowired(required = false)
    private Text2videoNewsSessionMapper text2videoNewsSessionMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public Text2videoNewsSession selectText2videoNewsSessionById(Long id)
    {
        return text2videoNewsSessionMapper.selectText2videoNewsSessionById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param text2videoNewsSession 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<Text2videoNewsSession> selectText2videoNewsSessionList(Text2videoNewsSession text2videoNewsSession)
    {
        return text2videoNewsSessionMapper.selectText2videoNewsSessionList(text2videoNewsSession);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param text2videoNewsSession 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertText2videoNewsSession(Text2videoNewsSession text2videoNewsSession)
    {
        text2videoNewsSession.setCreateTime(DateUtils.getNowDate());
        return text2videoNewsSessionMapper.insertText2videoNewsSession(text2videoNewsSession);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param text2videoNewsSession 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateText2videoNewsSession(Text2videoNewsSession text2videoNewsSession)
    {
        return text2videoNewsSessionMapper.updateText2videoNewsSession(text2videoNewsSession);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteText2videoNewsSessionByIds(Long[] ids)
    {
        return text2videoNewsSessionMapper.deleteText2videoNewsSessionByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteText2videoNewsSessionById(String id)
    {
        return text2videoNewsSessionMapper.deleteText2videoNewsSessionBySessionId(id);
    }
}
